<template>
  <div class="login">
    <el-form ref="loginRef" class="login-form">
      <h3 class="title">卫的个人博客</h3>
      <el-form-item prop="username">

        <el-input
            v-model="user.data.userName"
            type="text"
            size="large"
            auto-complete="off"
            placeholder="账号"
        >
          <template #prefix>
            <svg-icon icon='user'/>
          </template>
        </el-input>
      </el-form-item>
      <el-form-item prop="password">
        <el-input
            v-model="user.data.password"
            type="password"
            size="large"
            auto-complete="off"
            placeholder="密码"
            @keyup.enter="handleLogin"
            #prefix
        >
          <svg-icon icon='password'/>
        </el-input>
      </el-form-item>


      <el-checkbox style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
      <el-link type="primary" @click="dialogRegister = true">点击注册</el-link>
      <span style="margin-left: 10px">没有账号？</span>

      <!--          <router-link class="register-router" to="register" type="primary">点击注册</router-link>-->
      <el-form-item style="width:100%;">
        <el-button
            size="large"
            type="primary"
            style="width:100%;"
            @click.prevent="handleLogin"
        >
          <span>登 录</span>

        </el-button>

      </el-form-item>
    </el-form>
  </div>

</template>

<script>

</script>

<style scoped>

</style>